
REPLICATION FILES FOR:  
	
	Choosing Imputation Models
	Moritz Marbach
	Forthcoming in Political Analysis


	Please contact Moritz Marbach if you have any problems 
	or questions with these replication files: moritz.marbach@tamu.edu
	Current contact details are also available at: www.moritz-marbach.com




	September 13, 2021
	


INSTALL PACKAGES
================

Install the package "missDiag" 

	remotes:::install_local("./software/missDiag_1.0.0.tar.gz")


And the sbw package: 

	remotes::install_version("sbw", "1.1.3")


To replicate the numerical results, it might be necessary to install the exact versions of the mice and the Amelia package for R 4.0.2: 

	remotes::install_version("mice", "3.13.0")
	remotes::install_version("miceadds", "3.11-6")
	remotes::install_version("Amelia", "1.8.0")


To install all other auxiliary packages use: 

	remotes::install_version("tidyverse", "1.3.1")
	remotes::install_version("foreign", "0.8-80")
	remotes::install_version("ggpubr", "0.4.0")
	remotes::install_version("xtable", "1.8-4")
	remotes::install_version("pbapply", "1.4-3")
	remotes::install_version("texreg", "1.37.5")
	remotes::install_version("gridExtra", "2.3")
	remotes::install_version("sirt", "3.9-4")
	remotes::install_version("broom", "0.7.6")



INSTRUCTIONS
============

To replicate the Monte Carlo simulations, call the script "./mc/main.R'. The simulations are parallelized across 16 cores. If your machine features fewer cores, adjust the number of cores in the file "sim.R" (line 3). Total CPU time is about 4h (with 16 cores). 

To replicate the ANES results, call the script "./anes/main.R". These computations are not parallelized. The total CPU time is 68 hours. 




CORRESPONDENCE
==============

Figure 1 	 	- ./mc/results/mc_results_mar.pdf
Figure 2 		- ./anes/fig_main.pdf

Table 1  	 	- ./anes/tab_desc.tex
Table 2  	 	- ./anes/tab_main.tex

Figure A.1 	- ./mc/results/mc_results_mar_xx.pdf
Figure A.2 	- ./anes/fig_sm_income.pdf
Figure A.3 	- ./anes/fig_sm_jobs_r.pdf
Figure A.4 	- ./anes/fig_sm_religion.pdf
Figure A.5 	- ./anes/fig_sm_time.pdf
Figure A.6 	- ./anes/fig_sm_vote.pdf
Figure A.7 	- ./anes/fig_main_interactions.pdf



SESSION INFO
============

R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /cluster/spack/apps/linux-centos7-x86_64/gcc-8.2.0/openblas-0.2.19-xm2wvz2xbe6ep34pb2jwhtclellifetg/lib/libopenblas_haswellp-r0.2.19.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
 [1] ggpubr_0.4.0    foreign_0.8-80  gridExtra_2.3   texreg_1.37.5  
 [5] xtable_1.8-4    pbapply_1.4-3   Amelia_1.8.0    Rcpp_1.0.6     
 [9] miceadds_3.11-6 mice_3.13.0     missDiag_1.0.0  forcats_0.5.1  
[13] stringr_1.4.0   dplyr_1.0.6     purrr_0.3.4     readr_1.4.0    
[17] tidyr_1.1.3     tibble_3.1.1    ggplot2_3.3.3   tidyverse_1.3.1

loaded via a namespace (and not attached):
 [1] lubridate_1.7.10  lattice_0.20-41   assertthat_0.2.1  utf8_1.1.4       
 [5] R6_2.4.1          cellranger_1.1.0  backports_1.2.1   reprex_2.0.0     
 [9] httr_1.4.2        pillar_1.6.0      rlang_0.4.11      curl_4.3         
[13] readxl_1.3.1      data.table_1.14.0 rstudioapi_0.13   car_3.0-11       
[17] munsell_0.5.0     broom_0.7.6       compiler_4.0.2    modelr_0.1.8     
[21] pkgconfig_2.0.3   mitools_2.4       tidyselect_1.1.1  rio_0.5.27       
[25] cobalt_4.3.1      fansi_0.4.1       crayon_1.4.1      dbplyr_2.1.1     
[29] withr_2.3.0       grid_4.0.2        jsonlite_1.7.2    gtable_0.3.0     
[33] lifecycle_1.0.0   DBI_1.1.0         magrittr_2.0.1    scales_1.1.1     
[37] zip_2.2.0         carData_3.0-4     cli_3.0.1         stringi_1.5.3    
[41] ggsignif_0.6.2    fs_1.5.0          xml2_1.3.2        ellipsis_0.3.2   
[45] generics_0.0.2    vctrs_0.3.8       openxlsx_4.2.4    Formula_1.2-3    
[49] tools_4.0.2       glue_1.4.2        hms_1.0.0         abind_1.4-5      
[53] colorspace_1.4-1  rstatix_0.7.0     rvest_1.0.0       haven_2.3.1    
